
#define CIRCLES_NUM 8

namespace Nadine
{
	class NDLoadingScreen :public NDBaseObject
	{
	private:
		NDUID m_nBGTex0;
		NDUID m_nBGTex1;

		//screen info.
		int m_nState; //0:hidden, 1:beginning, 2:showing, 3:closing, 

		float m_fCurrentHeight;
		float m_fTargetHeight;

		float m_fCurrentPosition; //height;
		float m_fTargetPosition; //

		//animate logo info.
		float m_fCircleWidth[CIRCLES_NUM];
		float m_fCircleTargetWidth;
		int   m_nCurrentCircle;

	protected:
		void animateLoadingScreen( float fElapsedTime );

	public:
		explicit NDLoadingScreen( NDArk* pArk );
		virtual ~NDLoadingScreen() {}

		virtual void release();

		void initialize();
		void render(float fElapsedTime);

		void beginLoading();
		void endLoading();

		void setWindowSz( UINT nW, UINT nH );
	};
}